package com.cloudcentral;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * Create by Administrator
 * 2023/11/22 18:49
 */
@EnableFeignClients
@EnableDiscoveryClient
@SpringBootApplication
@EnableTransactionManagement
@MapperScan("com.cloudcentral.mapper")
public class RadioManagementApplication {
  public static void main(String[] args) {
    SpringApplication.run(RadioManagementApplication.class, args);
    /**String path = "D:\\Workspace\\Java\\cloud_central\\radio_central\\management\\src\\main";
     FastAutoGenerator.create("jdbc:mysql://localhost:3306/radio_central?characterEncoding=utf8&serverTimezone=GMT%2B8", "root", "localhost")

     .globalConfig((builder) -> builder.enableSwagger().enableSpringdoc().author("Administrator").outputDir(path + File.separator + "java").dateType(DateType.ONLY_DATE).disableOpenDir().disableServiceInterface().build())

     .packageConfig((stringStringFunction, builder) -> builder.parent("com.radiocentral").serviceImpl("service").pathInfo(Collections.singletonMap(OutputFile.xml, path + File.separator + "resources" + File.separator + "mapper")))

     .strategyConfig((builder) -> {
     builder.addTablePrefix("sys_");
     builder.entityBuilder().enableTableFieldAnnotation().enableChainModel().enableLombok().enableRemoveIsPrefix().disableSerialVersionUID().build();
     builder.controllerBuilder().enableRestStyle().enableHyphenStyle().build();
     builder.serviceBuilder().superServiceClass(IService.class).superServiceImplClass(ServiceImpl.class).formatServiceImplFileName("%sService").build();
     }).execute();
     System.out.println("-----------------代码生成完成！-----------------");*/
  }
}